{% extends 'admin/layout.html.twig' %}

{% set menu = 'admin_edu_cloud_email_overview' %} 
{% set script_controller = 'educloud/email-overview' %}        
{% set script_arguments = {chartData: chartData}  %}

{% block page_title %}
  {% if setting('cloud_status.locked') == true %}
    <div class="alert alert-warning" role="alert">{{'admin.edu_cloud.locked_tips'|trans}}：4008041114。</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% elseif account.status|default() == 'disable' %}
    <div class="alert alert-warning" role="alert">{{'
    admin.edu_cloud.edu_email.service_suspend_tips'|trans}}：4008041114。</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% else %}
    {{ parent() }}
  {% endif %}
{% endblock %}

{% block main %}
<div class="panel panel-default">
  <div class="panel-heading">
    {{'admin.edu_cloud.edu_email.basic_info'|trans}} 
  </div>
  <div class="panel-body">
    <div class="pll pbl">
      {{'admin.edu_cloud.edu_email.remain_count'|trans({'%span_first%': '<span class="h3 text-primary plm prs">', '%remainCount%': account.remainCount, '%span_last%': '</span>'})|raw}}
      {{'admin.edu_cloud.edu_email.email_buy_btn'|trans({'%buyUrl%': path('admin_cloud_email_buy', {type:'email'})})|raw}}
      <div class="text-danger pts">
      {{account.message}}
      </div>
    </div>
    <div class="pll pbm">
      {{'admin.edu_cloud.edu_email.today_send_count'|trans({'%span_first%': '<span class="color-gray phm text-md">', '%todayCount%': account.todayUsed, '%span_last%': '</span>'})|raw}}
      {{'admin.edu_cloud.edu_email.email_send_record'|trans({'%listUrl%': path('admin_cloud_email_list')})|raw}}
    </div>
  </div>
</div>

<div class="panel panel-default panel-chart">
  <input id="flowItemData" type="hidden" value="{{flowItem|default('')}}"/>
  <div class="panel-heading">
    {{'admin.edu_cloud.edu_email.email_send_trend'|trans({'%span_first%': '<span class="text-muted">', '%span_last%': '</span>'})|raw}}
    <a class="pull-right" href="{{ path('admin_cloud_email_list') }}" target="_blank">{{'admin.edu_cloud.edu_email.more_btn'|trans}}&ensp;></a>
  </div>
  <div class="panel-body">
    <div id="emailSendChart" style="width: 100%;height:400px;"></div>
  </div>
</div>
{% endblock %}